Skip to content

Cut the caret comments back to the one a reader would get wrong - #502

Merged
erwan-joly merged 1 commit into
masterfrom
style/trim-caret-comments
Aug 30, 2026
Merged

Cut the caret comments back to the one a reader would get wrong#502
erwan-joly merged 1 commit into
masterfrom
style/trim-caret-comments

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #499, which landed with far more comment than it earned.

Twelve blocks become one line. What goes:

  • the four-line note on StringSerializer's escapeSeparator parameter — the parameter name says what it is, and why the old one was wrong belongs in The separator a string field is escaped against is the one it is joined with #499's commit message, where it already is
  • the XML doc on EscapeSpaces — it was the only one in PacketIndexAttribute; IsOptional, SpecialSeparator, RemoveHeader and RemoveHash all carry none
  • five comments in the test file, each restating its own test name

What stays, one line: escaping a space when the separator is "|" reads as a mistake until you know the sub-packet sits inside a field of the packet above it.

122 tests still pass.

Summary by CodeRabbit

  • Documentation
    • Simplified internal code comments describing string escaping and nested packet values.
    • Removed outdated property and test annotations without changing functionality or test coverage.

Only the nested case is not visible from the code: escaping a space when the
separator is "|" looks wrong until you know the sub-packet sits inside a field
of the packet above it. The rest said what the names and the tests already say.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 482e332b-fc0a-4f4a-af0f-408e09ae8445

📥 Commits

Reviewing files that changed from the base of the PR and between 77ab304 and a3e30d4.

📒 Files selected for processing (3)
  • src/NosCore.Packets/Attributes/PacketIndexAttribute.cs
  • src/NosCore.Packets/Serializer.cs
  • test/NosCore.Packets.Tests/StringFieldSeparatorTests.cs
💤 Files with no reviewable changes (2)
  • src/NosCore.Packets/Attributes/PacketIndexAttribute.cs
  • test/NosCore.Packets.Tests/StringFieldSeparatorTests.cs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The change removes outdated comments and shortens one serializer comment. No production logic, public declarations, test logic, or assertions changed.

Changes

Comment cleanup

Layer / File(s) Summary
Update packet comments
src/NosCore.Packets/Attributes/PacketIndexAttribute.cs, src/NosCore.Packets/Serializer.cs
The EscapeSpaces XML documentation was removed. The comment before StringSerializer was shortened.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to a3e30

This PR removes redundant comments and keeps one clarification without changing runtime behavior, public contracts, dependencies, or tests; no actionable merge-blocking risk remains.

Suggested reviewers: denislauri1999

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: reducing comments while retaining one comment for the non-obvious nested sub-packet behavior. It is concise and related to the changeset.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch style/trim-caret-comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@erwan-joly
erwan-joly merged commit da0c36b into master Aug 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant